{extend name='main'}

{block name="content"}
<style>
    .think-box-shadow {
        box-shadow: none
    }

    .my-input {
        height: 200px;
        line-height: normal;
        padding: 10px;
        margin: 10px 0;
        width: 800px;
        resize: none
    }

    .layui-table[lay-skin=line] td, .layui-table[lay-skin=line] th {
        border-width: 1px;
    }

</style>

<div class="think-box-shadow store-total-container notselect"
     style="padding: 20px 15px !important;    margin-top: 10px;">

    <div class="layui-card-header" style="padding: 0">
        <i style="" class="layui-icon layui-icon-return my-layui-return" aria-hidden="true" data-tips-text="返回上页"
           onclick="javascript:history.go(-1);"></i>
        <span style="font-size: 15px;margin-left: 10px">敏感词测试</span>
    </div>

        <div class="info-box" style="margin-top: 15px">
            <textarea name="check_string" id="check_string" type="text" class="layui-input my-input" placeholder="请输入待检测字符串"></textarea>
            <button class="layui-btn btn-default sub-btn" type='button'>提交</button>
        </div>

</div>
<script>
    form.render();
    $('.sub-btn').click(function () {
        layer.load(0, {shade: false}); //0代表加载的风格，支持0-2
        $.ajax({
            url: '{:url("checkString")}',
            dataType: 'json',
            type: 'POST',
            data: {
                check_string: $('#check_string').val()
            },
            success: function (res) {
                layer.closeAll();
                layer.alert(res.info, {icon: res.code});
            }
        });
    })
</script>
{/block}